class GroupaliasListController {
    constructor($state, getGroupaliasList){

        this.$state = $state;
        this.getGroupaliasList = getGroupaliasList;

        // 分组列表
        this.getGroupaliasList && this.getGroupaliasList.code == 0 && (this.groupaliaslist = this.getGroupaliasList.data);

        console.log(this.getGroupaliasList)
    }

    // 判断aid是否存在，存在编辑，不存在则创建
    groupalias(aid, group_name) {
        !aid && this.$state.go('dashboard.race.groupalias', { group_name: group_name })
        !!aid && this.$state.go('dashboard.race.groupaliasedit', { aid: aid })
    }
}

GroupaliasListController.$inject = ['$state', 'getGroupaliasList']; 

export default GroupaliasListController;